package com.ezcoding.dao;

import com.ezcoding.model.Formula;
import com.jfinal.plugin.activerecord.Db;

import java.util.List;

public class FormulaDao {
    public static FormulaDao dao = new FormulaDao();

    public Formula getFormulaByCompanyIdAndCombineId(String companyId, String combineId) {
        String sql = Db.getSql("Formula.getFormulaByCompanyIdAndCombineId");

        return Formula.dao.findFirst(sql, companyId, combineId);
    }

    public List<Formula> getFormulasByCompanyId(String companyId) {
        String sql = Db.getSql("Formula.getFormulasByCompanyId");

        return Formula.dao.find(sql, companyId);
    }
}
